package com.frejoys.common.filter;


import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono;

/**
 * 自定义过滤器，使用自定义WebFlux内容
 */
@Component
public class WebFluxFilter implements WebFilter {


    @Override
    public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
        String url = exchange.getRequest().getURI().toString();
        // System.out.println("这是地址");
        // System.out.println(url);
        return chain.filter(exchange);
    }
}
